module DengHaiLightTools
  def self.edit_mode
    if Sketchup.active_model.tools.active_tool.instance_of?(DengHaiLightTools::Tools::EditMode)
      Sketchup.active_model.select_tool(nil)
    else
      Sketchup.active_model.select_tool(DengHaiLightTools::Tools::EditMode.new)
    end
  end
end
